﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Audio;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.GamerServices;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using Microsoft.Xna.Framework.Media;
namespace GameVLTK
{
    public class Cell : VisibleGameEntity
    {
      
        private int _CellType;

        public int CellType
        {
            get { return _CellType; }
            set { _CellType = value; }
        }
      
        /// <summary>
        /// 
        /// </summary>
        /// <param name="_content"></param>
        /// <param name="_path"></param>
        /// <param name="_topLeft"></param>
        /// <param name="_size"></param>
        public Cell(ContentManager _content, string _path, Vector2 _topLeft, Vector2 _size)
        {
            Texture2D[] textures;
            textures = new Texture2D[1];
            textures[0] = _content.Load<Texture2D>(_path);
        
            this.Sprites = new List<MySprite>();
            this.nSprites = 1;
            this.Size = new Vector2(textures[0].Width, textures[0].Height);
            this.TopLeft = _topLeft;


            MySprite mySprite = new MySprite(textures, _topLeft);

            int[] frameSequence = new int[1];
            frameSequence[0] = 0;
            mySprite.FrameSequence = frameSequence;

            this.Sprites.Add(mySprite);
        }

        public override void Update(GameTime gameTime)
        {
            this.Sprites[0].TopLeft = this.TopLeft;
            base.Update(gameTime);
        }
    }
}
